﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Demo.Entity;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace Demo.API
{
    [Route("api/[controller]")]
    [ApiController]
    public class ValuesController : ControllerBase
    {
        public ActionResult<Student> Get()
        {
            //return Content("api/values/get ok");


            var t = new Student();
            t.EnrollmentDate = DateTime.Now;
            t.FirstMidName = "a";
            t.ID = 1;
            t.LastName = "b";
            return t;

        }

        [HttpGet("{id}")]
        public async Task<ActionResult> GetId(int id)
        {
            return Content($"api/values/get ok，id={id}");

        }
    }
}
